/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.skuboard.model;

import java.util.List;
import org.skuboard.dao.StudentDAODummyImpl;
import org.skuboard.dao.StudentDAOInterface;


/**
 *
 * @author clockbuilder
 */
public class StudentService {
StudentDAOInterface schoolDb;

public StudentService() {
       schoolDb=new StudentDAODummyImpl();
    }

    public Student createStudent(Student newStudent) {
        //extract the student data from the request attributes
        //and use it to create the new student in the database
 
        return schoolDb.addStudent(newStudent);
    }

    public Student viewStudentProfile(String studentId) {
        Student student = schoolDb.getStudentById(studentId);
        return student;
    }

    public List<Student> getAllStudents() {
        return schoolDb.getAllStudents();
    }

    public String getAllStudentsInfo() {
        return schoolDb.getallStudentsInfo();
    }

    public String getStudentInfoById(String studentId){
        return schoolDb.getStudentInfo(studentId);
    }
    
}